package com.hosever.utils;

import java.util.UUID;

public class UUIdCreator {
	
	UUIdCreator() {
		
	}
	/**
	 * 有横杠UUID
	 * @param count
	 */
	public static void getUUId(int count){
		if(count<1){
			return;
		}
		for (int i = 0; i < count; i++) {
			System.out.println(UUID.randomUUID());
		}
	}
	/**
	 * 无横杠UUID
	 * @param count
	 */
	public static void getUUIdWithoutRod(int count){
		if(count<1){
			return;
		}
		for (int i = 0; i < count; i++) {
			System.out.println(UUID.randomUUID().toString().replaceAll("-", ""));
		}
	}
	
	public static void main(String[] args) {
		System.out.println("有横杠：");
		UUIdCreator.getUUId(3);
		System.out.println("无横杠：");
		UUIdCreator.getUUIdWithoutRod(3);
	}
}
